package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: TaskStagesAddRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-18
 * @Version: 1.0
 * Table: pear_task_stages
 * Comment:
 * 任务列表表
 */
public class TaskStagesAddRequestConvert extends BaseConvert {
    public static TaskStagesWithBLOBs convert(TaskStagesAddRequest request) throws Exception {
        TaskStagesWithBLOBs daoRequest = new TaskStagesWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setName(daoRequest.getName() == null ? null : daoRequest.getName().trim());
        daoRequest.setProjectCode(daoRequest.getProjectCode() == null ? null : daoRequest.getProjectCode().trim());
        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setDescription(daoRequest.getDescription() == null ? null : daoRequest.getDescription().trim());

        return daoRequest;
    }
}
